|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpresentation.graph.GraphFactory
public class GraphFactory
Factory to create a JGraph object from a Service
| Field Summary | |
|---|---|
private java.util.HashMap<StateAction,org.jgraph.graph.DefaultEdge> |
edgeMap
|
private org.jgraph.JGraph |
graph
|
static java.lang.String[] |
layouts
|
private java.util.HashMap<State,org.jgraph.graph.DefaultGraphCell> |
vertexMap
|
| Constructor Summary | |
|---|---|
GraphFactory(Service service)
Create a new GraphFactory |
|
| Method Summary | |
|---|---|
static void |
changeRepresentation(org.jgraph.JGraph graph,
java.lang.String layout)
Change the layout of the graph |
static org.jgraph.graph.DefaultEdge |
createEdge(java.lang.String edge,
org.jgraph.graph.DefaultGraphCell source,
org.jgraph.graph.DefaultGraphCell target)
create an edge |
private void |
createGraph(Service service)
Create a JGraph component from service |
static org.jgraph.graph.DefaultGraphCell |
createVertex(java.lang.String node,
boolean isFinalState)
create a vertex |
java.util.HashMap<StateAction,org.jgraph.graph.DefaultEdge> |
getEdgeMap()
Return an hash map key: action of service value: edge of graph |
org.jgraph.JGraph |
getGraph()
return the generated graph |
java.util.HashMap<State,org.jgraph.graph.DefaultGraphCell> |
getVertexMap()
Return an hash map key: state of service value: vertex of graph |
static void |
selectEdge(org.jgraph.JGraph graph,
org.jgraph.graph.DefaultEdge edge,
boolean select)
Change the color of the edge |
static void |
selectVertex(org.jgraph.JGraph graph,
org.jgraph.graph.DefaultGraphCell cell,
boolean select)
Change the color of the vertex |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.jgraph.JGraph graph
private java.util.HashMap<State,org.jgraph.graph.DefaultGraphCell> vertexMap
private java.util.HashMap<StateAction,org.jgraph.graph.DefaultEdge> edgeMap
public static final java.lang.String[] layouts
| Constructor Detail |
|---|
public GraphFactory(Service service)
service - the service| Method Detail |
|---|
public org.jgraph.JGraph getGraph()
public java.util.HashMap<State,org.jgraph.graph.DefaultGraphCell> getVertexMap()
public java.util.HashMap<StateAction,org.jgraph.graph.DefaultEdge> getEdgeMap()
private void createGraph(Service service)
service - the selected service
public static org.jgraph.graph.DefaultGraphCell createVertex(java.lang.String node,
boolean isFinalState)
node - the name of the vertexisFinalState - true if node is final
public static org.jgraph.graph.DefaultEdge createEdge(java.lang.String edge,
org.jgraph.graph.DefaultGraphCell source,
org.jgraph.graph.DefaultGraphCell target)
edge - the name of the actionsource - source vertextarget - target vertex
public static void selectVertex(org.jgraph.JGraph graph,
org.jgraph.graph.DefaultGraphCell cell,
boolean select)
graph - the graphcell - the selected vertexselect - the vertex is blue if true or it is black if false
public static void selectEdge(org.jgraph.JGraph graph,
org.jgraph.graph.DefaultEdge edge,
boolean select)
graph - the graphedge - the selected edgeselect - the edge is red if true or black if false
public static void changeRepresentation(org.jgraph.JGraph graph,
java.lang.String layout)
graph - the graphlayout - the name of the layout
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||